package CtrlLayer;
import ModelLayer.*;

import java.util.ArrayList;

import static org.junit.Assert.*;
import org.junit.Before;
import org.junit.Test;

/**
 * CtrlSupplierTest.java
 * @author Brian Lassen
 * @version 21. Marts 2012
 */
public class CtrlSupplierTest {

	@Before
	public void setUp() throws Exception {
	}

	@Test
	public final void testCtrlSupplier() {
		fail("Not yet implemented"); // TODO
	}

	@Test
	public final void testFindAllSupplier() {
		ArrayList<Supplier> allSupplier = new ArrayList<Supplier>();
		allSupplier = CtrlSupplier.findAllSupplier();
		for (Supplier allSuppliers : allSupplier){
			System.out.println(allSuppliers.getId() + " " + allSuppliers.getName() + " " + allSuppliers.getAddress());
			System.out.println(allSuppliers.getCountry() + " " + allSuppliers.getPhone() + " " + allSuppliers.getEmail());
			System.out.println();
		}
	}

	@Test
	public final void testFindById() {  // id >= 1000
		Supplier mySupplier = new Supplier();
		mySupplier = CtrlSupplier.findById(1000);
		System.out.println(mySupplier.getId() + " " + mySupplier.getName() + " " + mySupplier.getAddress());
		System.out.println(mySupplier.getCountry() + " " + mySupplier.getPhone() + " " + mySupplier.getEmail());
		System.out.println();
	}

	@Test
	public final void testFindByName() {
		fail("Not yet implemented"); // TODO
	}

	@Test
	public final void testFindByPhone() {
		fail("Not yet implemented"); // TODO
	}

	@Test
	public final void testUpdateSupplier() {
		fail("Not yet implemented"); // TODO
	}

	@Test
	public final void testInsertNew() {
		fail("Not yet implemented"); // TODO
	}

	@Test
	public final void testDeleteCust() {
		fail("Not yet implemented"); // TODO
	}

}
